package br.zeus.lemenu

import junit.framework.Assert;
import grails.test.*

class MenuTests extends GrailsUnitTestCase {
	protected void setUp() {
		
	}

	protected void tearDown() {
		super.tearDown()
	}

	void test_menu_especial_deve_ter_duracao_de_apenas_um_dia() {
		mockDomain(Menu)
		def menusEspeciais = Menu.findAllByEEspecial(true)
		for (Menu menu : menusEspeciais) {
			assertEquals menu.getDataInicial(), menu.getDataFinal()
		}
	}
	
	void xtest_menu_deve_ter_datas_validas() {
		mockDomain(Menu)
		def menus = Menu.list()
		
		menus.each {
			assertNotNull(it.getDataInicial())
			assertNotNull(it.getDataFinal())
			//assertTrue(it.getDataInicial() <= it.getDataFinal())
			
			
		}
	}
	
	
	
}
